package com.sxdx.dao.impl;

import java.io.Serializable;
import java.util.List;
import javax.annotation.Resource;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.hibernate.Query;
import org.springframework.stereotype.Repository;
import com.sxdx.dao.TeacherDAO;
import com.sxdx.dao.BaseDAO;
import com.sxdx.entity.Teacher;

@SuppressWarnings("all")
@Repository("teacherDAO")
public class TeacherDAOImpl implements TeacherDAO {
	private static Logger logger = LogManager.getLogger(Thread.currentThread().getStackTrace()[1].getClassName());
	@Resource(name="baseDAO")
	private BaseDAO<Teacher> baseDAO;
	
	public Serializable save(Teacher teacher) {
		return baseDAO.save(teacher);
	}
	
	public void delete(Teacher teacher) {
		baseDAO.delete(teacher);
		
	}
	
	public void update(Teacher teacher) {
		baseDAO.update(teacher);
		
	}
	
	public void saveOrUpdate(Teacher teacher) {
		baseDAO.saveOrUpdate(teacher);
	}
	
	public List<Teacher> find(String hql) {
		return baseDAO.find(hql);
	}
	
	public List<Teacher> find(String hql, Object[] param) {
		return baseDAO.find(hql, param);
	}
	
	public List<Teacher> find(String hql, List<Object> param) {
		return baseDAO.find(hql, param);
	}
	
	public List<Teacher> find(String hql, Object[] param, Integer page,
			Integer rows) {
		return baseDAO.find(hql, param, page, rows);
	}
	
	public List<Teacher> find(String hql, List<Object> param, Integer page,
			Integer rows) {
		return baseDAO.find(hql, param, page, rows);
	}
	
	public Teacher get(Class<Teacher> c, Serializable id) {
		return baseDAO.get(c, id);
	}
	
	public Teacher get(String hql, Object[] param) {
		return baseDAO.get(hql, param);
	}
	
	public Teacher get(String hql, List<Object> param) {
		return baseDAO.get(hql, param);
	}
	
	public Long count(String hql) {
		return baseDAO.count(hql);
	}
	
	public Long count(String hql, Object[] param) {
		return baseDAO.count(hql, param);
	}
	
	public Long count(String hql, List<Object> param) {
		return baseDAO.count(hql, param);
	}
	
	public Integer executeHql(String hql) {
		return baseDAO.executeHql(hql);
	}
	
	public Integer executeHql(String hql, Object[] param) {
		return baseDAO.executeHql(hql, param);
	}
	
	public Integer executeHql(String hql, List<Object> param) {
		return baseDAO.executeHql(hql, param);
	}
	
	public List<Teacher> page(String hql, Integer offset, Integer size) {
		return baseDAO.page(hql,offset,size);
	}
	
	public Query findBySql(String sql) {
		return null;
	}
}
